//
// Created by xili on 2024/8/11 下午7:06.
// Go big or go home.
//
#include "leetcode.h"

class Solution {
public:
    vector<int> twoSum(vector<int> &price, int target) {
        unordered_set<int> us;
        for (auto &item: price) {
            if (us.count(target - item)) {
                return {item, target - item};
            }
            us.insert(item);
        }
        return {0, 0};
    }
};